package com.chen.springboot.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chen.springboot.entity.ItemOption;
import com.chen.springboot.mapper.ItemOptionMapper;
import com.chen.springboot.service.ItemOptionService;
import org.springframework.stereotype.Service;

@Service
public class ItemOptionServiceImpl extends ServiceImpl<ItemOptionMapper, ItemOption> implements ItemOptionService {
    
    @Override
    public ItemOption getByItemId(Long itemId) {
        QueryWrapper<ItemOption> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("item_id", itemId);
        return this.getOne(queryWrapper);
    }
}

